package com.heima.feign.client;

import com.heima.feign.config.ArticleClientFallbackFactory;
import com.heima.feign.config.DefaultFeignConfiguration;
import com.heima.model.article.dto.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "leadnews-article",configuration = DefaultFeignConfiguration.class,fallbackFactory = ArticleClientFallbackFactory.class)
public interface ArticleFetignClient {

    @PostMapping("/api/v1/article/save")
    ResponseResult  saveArticle(@RequestBody ArticleDto dto);
}
